Method and apparatus for further improved context design for prediction mode and coded block flag (cbf)

ABSTRACT

A method of controlling intra-inter prediction for decoding or encoding of a video sequence, is performed by at least one processor. The method includes determining whether one or more neighboring blocks in a video sequence is coded by an intra prediction mode, coding a prediction mode flag of a current block by a first context based on determining that at least one of the neighboring blocks is coded by the intra prediction mode, and coding the prediction mode flag of the current block by a second context based on determining that none of the neighboring blocks are coded by at least the intra prediction mode.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation of U.S. application Ser. No.16/393,439, filed on Apr. 24 20219, and claims priority from U.S.Provisional Patent Application No. 62,777,041, filed on Dec. 7, 2018, inthe United States Patent and Trademark Office, which is incorporatedherein by reference in its entirety.

BACKGROUND 1. Field

Methods and apparatuses consistent with embodiments relate to videocoding, and more particularly, a method and an apparatus for an improvedcontext design for a prediction mode and a coded block flag (CBF).

2. Description of Related Art

Intra prediction modes used in High Efficiency Video Coding (HEVC) areillustrated in FIG. 1A. In HEVC, there are a total 35 intra predictionmodes, among which mode 10 (101) is a horizontal mode, mode 26 (102) isa vertical mode, and mode 2 (103), mode 18 (104) and mode 34 (105) arediagonal modes. The intra prediction modes are signaled by three mostprobable modes (MPMs) and 32 remaining modes.

Regarding Versatile Video Coding (VVC), a partial coding unit syntaxtable is shown below. A flag pred_mode_flag is signaled in a case inwhich a slice type is not intra and a skip mode is not selected, andonly one context (e.g., variable pred_mode_flag) is used for coding thisflag. The partial coding unit syntax table is as follows:

7.3.4.5 Coding Unit Syntax

Descriptor coding_unit( x0, y0, cbWidth, cbHeight, treeType ) {  if(slice_type != I ) {   cu_skip_flag[ x0 ][ y0 ] ae(v)   if( cu_skip_flag[x0 ][ y0 ] = = 0 )    pred_mode_flag ae(v)  }  if( CuPredMode[ x0 ][ y0] = = MODE_INTRA ) {   . . .

Referring to FIG. 1B, in VVC, there are a total 87 intra predictionmodes, among which mode 18 (106) is a horizontal mode, mode 50 (107) isa vertical mode, and mode 2 (108), mode 34 (109) and mode 66 (110) arediagonal modes. Modes −1 to −10 (111) and Modes 67 to 76 (112) arecalled Wide-Angle Intra Prediction (WAIP) modes.

For a chroma component of an intra coded block, an encoder selects bestchroma prediction modes among five modes, including a planar mode (modeindex 0), a DC mode (mode index 1), a horizontal mode (mode index 18), avertical mode (mode index 50) and a Diagonal mode (mode index 66), and adirect copy of an intra prediction mode for an associated lumacomponent, namely, the DM mode. A mapping between an intra predictiondirection and an intra prediction mode number for chroma is shown inTable 1 below:

TABLE 1 Mapping between intra prediction direction and intra predictionmode for chroma intra_chroma_pred_ IntraPredModeY[ xCb + cbWidth/2 ][yCb + cbHeight/2 ] mode[ xCb ][ yCb ]  0 50 18  1 X( 0 <= X <= 66 ) 0 66 0  0  0  0 1 50 66 50 50 50 2 18 18 66 18 18 3  1  1  1 66  1 4  0 5018  1 X

To avoid a duplicate mode, the four modes other than the DM mode areassigned according to the intra prediction mode of the associated lumacomponent. When the intra prediction mode number for the chromacomponent is 4, the intra prediction direction for the luma component isused for intra prediction sample generation for the chroma component.When the intra prediction mode number for the chroma component is not 4and is identical to the intra prediction mode number for the lumacomponent, an intra prediction direction of 66 is used for the intraprediction sample generation for the chroma component.

Multi-hypothesis intra-inter prediction combines one intra predictionand one merge indexed prediction, namely, an intra-inter predictionmode. In a merge coding unit (CU), one flag is signaled for a merge modeto select an intra mode from an intra candidate list when the flag istrue. For a luma component, the intra candidate list is derived from 4intra prediction modes including DC, planar, horizontal, and verticalmodes, and a size of the intra candidate list can be 3 or 4 depending ona block shape. When a CU width is larger than double a CU height, thehorizontal mode is removed from the intra candidate list, and when theCU height is larger than double the CU width, the vertical mode isremoved from the intra candidate list. One intra prediction modeselected by an intra mode index and one merge indexed predictionselected by a merge index are combined using a weighted average. For achroma component, DM is always applied without extra signaling.

Weights for combining predictions are described as follows. When a DC orplanar mode is selected or a Coding Block (CB) width or height issmaller than 4, equal weights are applied. For those CBs with a CB widthor height larger than or equal to 4, when a horizontal/vertical mode isselected, one CB is first vertically/horizontally split into fourequal-area regions. Each weight set, denoted as (w_intra₁, w_inter₁),where i is from 1 to 4 and (w_intra₁, w_inter₁)=(6, 2), (w_intra₂,w_inter₂)=(5, 3), (w_intra₃, w_inter₃)=(3, 5), and (w_intra₄,w_inter₄)=(2, 6), will be applied to a corresponding region. (w_intra₁,w_inter₁) is for a region closest to reference samples, and (w_intra₄,w_inter₄) is for a region farthest away from the reference samples.Then, a combined prediction can be calculated by summing up two weightedpredictions and right-shifting 3 bits. Moreover, an intra predictionmode for an intra hypothesis of predictors can be saved for an intramode coding of following neighboring CBs if they are intra coded.

SUMMARY

According to embodiments, there is a method for video coding, decodingor encoding, comprising determining whether at least one of a pluralityof neighboring blocks in a video sequence is coded by an intraprediction mode, entropy coding a prediction mode flag of a currentblock by a first context in response to determining that at least one ofthe plurality of neighboring blocks is coded by the intra predictionmode, and entropy coding the prediction mode flag of the current blockby a second context in response to determining that none of theplurality of neighboring blocks are coded by at least the intraprediction mode.

According to embodiments, there is an apparatus for video coding,decoding or encoding, the apparatus comprising at least one memoryconfigured to store computer program code, and at least one processorconfigured to access the at least one memory and operate according tothe computer program code. The computer program code comprising firstdetermining code configured to cause the at least one processor todetermine whether at least one of a plurality of neighboring blocks in avideo sequence is coded by an intra prediction mode, performing codeconfigured to cause the at least one processor to entropy code aprediction mode flag of a current block by a first context in responseto determining that at least one of the plurality of neighboring blocksis coded by the intra prediction mode, and second performing codeconfigured to cause the at least one processor to entropy code theprediction mode flag of the current block by a second context inresponse to determining that none of the plurality of neighboring blocksare coded by at least the intra prediction mode.

According to embodiments, there is a non-transitory computer-readablestorage medium storing instructions that cause at least one processor todetermine whether at least one of a plurality of neighboring blocks in avideo sequence is coded by an intra prediction mode, entropy code aprediction mode flag of a current block by a first context in responseto determining that at least one of the plurality of neighboring blocksis coded by the intra prediction mode, and entropy code the predictionmode flag of the current block by a second context in response todetermining that none of the plurality of neighboring blocks are codedby at least the intra prediction mode.

According to embodiments, there is entropy coding the prediction modeflag of the current block comprises coding by only the first context andthe second context.

According to embodiments, there is determining whether at least one ofthe plurality of neighboring blocks is coded by an intra-interprediction mode, entropy coding the prediction mode flag of the currentblock by the first context in response to determining that at least oneof the plurality of neighboring blocks is coded by the intra-interprediction mode, and entropy coding the prediction mode flag of thecurrent block by the second context in response to determining that noneof the plurality of neighboring blocks are coded by any of the intraprediction mode and the intra-inter prediction mode.

According to embodiments, there is entropy coding a skip flag of thecurrent block by a first skip context in response to determining that atleast one of the plurality of neighboring blocks is coded by the intraprediction mode, and entropy coding the skip flag of the current blockby a second skip context in response to determining that none of theplurality of neighboring blocks are coded by at least the intraprediction mode.

According to embodiments, there is entropy coding an affine flag of thecurrent block by a first affine context in response to determining thatat least one of the plurality of neighboring blocks is coded by theintra prediction mode, and entropy coding the affine flag of the currentblock by a second affine context in response to determining that none ofthe plurality of neighboring blocks are coded by at least the intraprediction mode.

According to embodiments, there is entropy coding a sub-block merge flagof the current block by a first sub-block merge context in response todetermining that at least one of the plurality of neighboring blocks iscoded by the intra prediction mode, and entropy coding the sub-blockmerge flag of the current block by a second sub-block merge context inresponse to determining that none of the plurality of neighboring blocksare coded by at least the intra prediction mode.

According to embodiments, there is entropy coding a coding unit (CU)split flag of the current block by a first CU split context in responseto determining that at least one of the plurality of neighboring blocksis coded by the intra prediction mode, and entropy coding the CU splitflag of the current block by a second CU split context in response todetermining that none of the plurality of neighboring blocks are codedby at least the intra prediction mode.

According to embodiments, there is entropy coding an adaptive motionvector resolution (AMVR) flag of the current block by a first AMVRcontext in response to determining that at least one of the plurality ofneighboring blocks is coded by the intra prediction mode, and entropycoding the AMVR flag of the current block by a second AMVR context inresponse to determining that none of the plurality of neighboring blocksare coded by at least the intra prediction mode.

According to embodiments, there is entropy coding an intra-inter modeflag of the current block by a first intra-inter mode context inresponse to determining that at least one of the plurality ofneighboring blocks is coded by the intra prediction mode, and entropycoding the intra-inter mode flag of the current block by a secondintra-inter mode context in response to determining that none of theplurality of neighboring blocks are coded by at least the intraprediction mode.

According to embodiments, there is entropy coding a trianglepartitioning mode flag of the current block by a first trianglepartitioning mode context in response to determining that at least oneof the plurality of neighboring blocks is coded by the intra predictionmode, and entropy coding the triangle partitioning mode flag of thecurrent block by a second triangle partitioning mode context in responseto determining that none of the plurality of neighboring blocks arecoded by at least the intra prediction mode.

According to embodiments, there is entropy coding a coded block flag(CBF) of the current block by a first CBF context in response todetermining that at least one of the plurality of neighboring blocks iscoded by the intra prediction mode, and entropy coding the CBF of thecurrent block by a second CBF context in response to determining thatnone of the plurality of neighboring blocks are coded by at least theintra prediction mode.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1A is a diagram of intra prediction modes in HEVC.

FIG. 1B is a diagram of intra prediction modes in VVC.

FIG. 2 is a simplified block diagram of a communication system accordingto an embodiment.

FIG. 3 is a diagram of a placement of a video encoder and a videodecoder in a streaming environment, according to an embodiment.

FIG. 4 is a functional block diagram of a video decoder according to anembodiment.

FIG. 5 is a functional block diagram of a video encoder according to anembodiment.

FIG. 6 is a diagram of a current block and neighboring blocks of thecurrent block, according to embodiments.

FIG. 7 is a flowchart illustrating a method of controlling intra-interprediction for decoding or encoding of a video sequence, according to anembodiment.

FIG. 8 is a simplified block diagram of an apparatus for controllingintra-inter prediction for decoding or encoding of a video sequence,according to an embodiment.

FIG. 9 is a diagram of a computer system suitable for implementingembodiments.

FIG. 10 is a flowchart illustrating a method of controlling decoding orencoding of a video sequence, according to embodiments.

FIG. 11 is a flowchart illustrating a method of controlling decoding orencoding of a video sequence, according to an embodiments.

DETAILED DESCRIPTION

FIG. 2 is a simplified block diagram of a communication system (200)according to an embodiment. The communication system (200) may includeat least two terminals (210-220) interconnected via a network (250). Forunidirectional transmission of data, a first terminal (210) may codevideo data at a local location for transmission to the other terminal(220) via the network (250). The second terminal (220) may receive thecoded video data of the other terminal from the network (250), decodethe coded data and display the recovered video data. Unidirectional datatransmission may be common in media serving applications and the like.

FIG. 2 illustrates a second pair of terminals (230, 240) provided tosupport bidirectional transmission of coded video that may occur, forexample, during videoconferencing. For bidirectional transmission ofdata, each terminal (230, 240) may code video data captured at a locallocation for transmission to the other terminal via the network (250).Each terminal (230, 240) also may receive the coded video datatransmitted by the other terminal, may decode the coded data and maydisplay the recovered video data at a local display device.

In FIG. 2, the terminals (210-240) may be illustrated as servers,personal computers and smart phones but the principles of embodimentsare not so limited. Embodiments find application with laptop computers,tablet computers, media players and/or dedicated video conferencingequipment. The network (250) represents any number of networks thatconvey coded video data among the terminals (210-240), including forexample wireline and/or wireless communication networks. Thecommunication network (250) may exchange data in circuit-switched and/orpacket-switched channels. Representative networks includetelecommunications networks, local area networks, wide area networksand/or the Internet. For the purposes of the present discussion, thearchitecture and topology of the network (250) may be immaterial to theoperation of embodiments unless explained herein below.

FIG. 3 is a diagram of a placement of a video encoder and a videodecoder in a streaming environment (300), according to an embodiment.The disclosed subject matter can be equally applicable to other videoenabled applications, including, for example, video conferencing,digital TV, storing of compressed video on digital media including CD,DVD, memory stick and the like, and so on.

A streaming system may include a capture subsystem (313) that caninclude a video source (301), for example a digital camera, creating,for example, an uncompressed video sample stream (302). That samplestream (302), depicted as a bold line to emphasize a high data volumewhen compared to encoded video bitstreams, can be processed by anencoder (303) coupled to the camera (301). The encoder (303) can includehardware, software, or a combination thereof to enable or implementaspects of the disclosed subject matter as described in more detailbelow. The encoded video bitstream (304), depicted as a thin line toemphasize the lower data volume when compared to the sample stream, canbe stored on a streaming server (305) for future use. One or morestreaming clients (306, 308) can access the streaming server (305) toretrieve copies (307, 309) of the encoded video bitstream (304). Aclient (306) can include a video decoder (310) which decodes theincoming copy of the encoded video bitstream (307) and creates anoutgoing video sample stream (311) that can be rendered on a display(312) or other rendering device (not depicted). In some streamingsystems, the video bitstreams (304, 307, 309) can be encoded accordingto certain video coding/compression standards. Examples of thosestandards include ITU-T Recommendation H.265. Under development is avideo coding standard, VVC. The disclosed subject matter may be used inthe context of VVC.

FIG. 4 is a functional block diagram (400) of a video decoder (310)according to an embodiment.

A receiver (410) may receive one or more codec video sequences to bedecoded by the decoder (310); in the same or an embodiment, one codedvideo sequence at a time, where the decoding of each coded videosequence is independent from other coded video sequences. The codedvideo sequence may be received from a channel (412), which may be ahardware/software link to a storage device which stores the encodedvideo data. The receiver (410) may receive the encoded video data withother data, for example, coded audio data and/or ancillary data streams,that may be forwarded to their respective using entities (not depicted).The receiver (410) may separate the coded video sequence from the otherdata. To combat network jitter, a buffer memory (415) may be coupled inbetween receiver (410) and entropy decoder/parser (420) (“parser”henceforth). When receiver (410) is receiving data from a store/forwarddevice of sufficient bandwidth and controllability, or from anisosychronous network, the buffer (415) may not be needed, or can besmall. For use on best effort packet networks such as the Internet, thebuffer (415) may be required, can be comparatively large and canadvantageously of adaptive size.

The video decoder (310) may include a parser (420) to reconstructsymbols (421) from the entropy coded video sequence. Categories of thosesymbols include information used to manage operation of the decoder(310), and potentially information to control a rendering device such asa display (312) that is not an integral part of the decoder but can becoupled to it, as was shown in FIG. 4. The control information for therendering device(s) may be in the form of Supplementary EnhancementInformation (SEI messages) or Video Usability Information (VUI)parameter set fragments (not depicted). The parser (420) mayparse/entropy-decode the coded video sequence received. The coding ofthe coded video sequence can be in accordance with a video codingtechnology or standard, and can follow principles well known to a personskilled in the art, including variable length coding, Huffman coding,arithmetic coding with or without context sensitivity, and so forth. Theparser (420) may extract from the coded video sequence, a set ofsubgroup parameters for at least one of the subgroups of pixels in thevideo decoder, based upon at least one parameters corresponding to thegroup. Subgroups can include Groups of Pictures (GOPs), pictures, tiles,slices, macroblocks, CUs, blocks, Transform Units (TUs), PredictionUnits (PUs) and so forth. The entropy decoder/parser may also extractfrom the coded video sequence information such as transformcoefficients, quantizer parameter (QP) values, motion vectors, and soforth.

The parser (420) may perform entropy decoding/parsing operation on thevideo sequence received from the buffer (415), so to create symbols(421). The parser (420) may receive encoded data, and selectively decodeparticular symbols (421). Further, the parser (420) may determinewhether the particular symbols (421) are to be provided to a MotionCompensation Prediction unit (453), a scaler/inverse transform unit(451), an Intra Prediction unit (452), or a loop filter unit (454).

Reconstruction of the symbols (421) can involve multiple different unitsdepending on the type of the coded video picture or parts thereof (suchas: inter and intra picture, inter and intra block), and other factors.Which units are involved, and how, can be controlled by the subgroupcontrol information that was parsed from the coded video sequence by theparser (420). The flow of such subgroup control information between theparser (420) and the multiple units below is not depicted for clarity.

Beyond the functional blocks already mentioned, decoder (310) can beconceptually subdivided into a number of functional units as describedbelow. In a practical implementation operating under commercialconstraints, many of these units interact closely with each other andcan, at least partly, be integrated into each other. However, for thepurpose of describing the disclosed subject matter, the conceptualsubdivision into the functional units below is appropriate.

A first unit is the scaler/inverse transform unit (451). Thescaler/inverse transform unit (451) receives quantized transformcoefficient as well as control information, including which transform touse, block size, quantization factor, quantization scaling matrices,etc. as symbol(s) (421) from the parser (420). It can output blockscomprising sample values that can be input into aggregator (455).

In some cases, the output samples of the scaler/inverse transform (451)can pertain to an intra coded block; that is: a block that is not usingpredictive information from previously reconstructed pictures, but canuse predictive information from previously reconstructed parts of thecurrent picture. Such predictive information can be provided by an intrapicture prediction unit (452). In some cases, the intra pictureprediction unit (452) generates a block of the same size and shape ofthe block under reconstruction, using surrounding already reconstructedinformation fetched from the current (partly reconstructed) picture(456). The aggregator (455), in some cases, adds, on a per sample basis,the prediction information the intra prediction unit (452) has generatedto the output sample information as provided by the scaler/inversetransform unit (451).

In other cases, the output samples of the scaler/inverse transform unit(451) can pertain to an inter coded, and potentially motion compensatedblock. In such a case, a Motion Compensation Prediction unit (453) canaccess reference picture memory (457) to fetch samples used forprediction. After motion compensating the fetched samples in accordancewith the symbols (421) pertaining to the block, these samples can beadded by the aggregator (455) to the output of the scaler/inversetransform unit (in this case called the residual samples or residualsignal) so to generate output sample information. The addresses withinthe reference picture memory form where the motion compensation unitfetches prediction samples can be controlled by motion vectors,available to the motion compensation unit in the form of symbols (421)that can have, for example X, Y, and reference picture components.Motion compensation also can include interpolation of sample values asfetched from the reference picture memory when sub-sample exact motionvectors are in use, motion vector prediction mechanisms, and so forth.

The output samples of the aggregator (455) can be subject to variousloop filtering techniques in the loop filter unit (454). Videocompression technologies can include in-loop filter technologies thatare controlled by parameters included in the coded video bitstream andmade available to the loop filter unit (454) as symbols (421) from theparser (420), but can also be responsive to meta-information obtainedduring the decoding of previous (in decoding order) parts of the codedpicture or coded video sequence, as well as responsive to previouslyreconstructed and loop-filtered sample values.

The output of the loop filter unit (454) can be a sample stream that canbe output to the render device (312) as well as stored in the referencepicture memory (456) for use in future inter-picture prediction.

Certain coded pictures, once fully reconstructed, can be used asreference pictures for future prediction. Once a coded picture is fullyreconstructed and the coded picture has been identified as a referencepicture (by, for example, parser (420)), the current reference picture(456) can become part of the reference picture buffer (457), and a freshcurrent picture memory can be reallocated before commencing thereconstruction of the following coded picture.

The video decoder (310) may perform decoding operations according to apredetermined video compression technology that may be documented in astandard, such as ITU-T Rec. H.265. The coded video sequence may conformto a syntax specified by the video compression technology or standardbeing used, in the sense that it adheres to the syntax of the videocompression technology or standard, as specified in the videocompression technology document or standard and specifically in theprofiles document therein. Also necessary for compliance can be that thecomplexity of the coded video sequence is within bounds as defined bythe level of the video compression technology or standard. In somecases, levels restrict the maximum picture size, maximum frame rate,maximum reconstruction sample rate (measured in, for example megasamplesper second), maximum reference picture size, and so on. Limits set bylevels can, in some cases, be further restricted through HypotheticalReference Decoder (HRD) specifications and metadata for HRD buffermanagement signaled in the coded video sequence.

In an embodiment, the receiver (410) may receive additional (redundant)data with the encoded video. The additional data may be included as partof the coded video sequence(s). The additional data may be used by thevideo decoder (310) to properly decode the data and/or to moreaccurately reconstruct the original video data. Additional data can bein the form of, for example, temporal, spatial, or signal-to-noise ratio(SNR) enhancement layers, redundant slices, redundant pictures, forwarderror correction codes, and so on.

FIG. 5 is a functional block diagram (500) of a video encoder (303)according to an embodiment.

The encoder (303) may receive video samples from a video source (301)(that is not part of the encoder) that may capture video image(s) to becoded by the encoder (303).

The video source (301) may provide the source video sequence to be codedby the encoder (303) in the form of a digital video sample stream thatcan be of any suitable bit depth (for example: 8 bit, 10 bit, 12 bit, .. . ), any colorspace (for example, BT.601 Y CrCB, RGB, . . . ) and anysuitable sampling structure (for example Y CrCb 4:2:0, Y CrCb 4:4:4). Ina media serving system, the video source (301) may be a storage devicestoring previously prepared video. In a videoconferencing system, thevideo source (301) may be a camera that captures local image informationas a video sequence. Video data may be provided as a plurality ofindividual pictures that impart motion when viewed in sequence. Thepictures themselves may be organized as a spatial array of pixels,wherein each pixel can comprise one or more samples depending on thesampling structure, color space, etc. in use. A person skilled in theart can readily understand the relationship between pixels and samples.The description below focuses on samples.

According to an embodiment, the encoder (303) may code and compress thepictures of the source video sequence into a coded video sequence (543)in real time or under any other time constraints as required by theapplication. Enforcing appropriate coding speed is one function ofcontroller (550). Controller controls other functional units asdescribed below and is functionally coupled to these units. The couplingis not depicted for clarity. Parameters set by controller can includerate control related parameters (picture skip, quantizer, lambda valueof rate-distortion optimization techniques, . . . ), picture size, groupof pictures (GOP) layout, maximum motion vector search range, and soforth. A person skilled in the art can readily identify other functionsof controller (550) as they may pertain to video encoder (303) optimizedfor a certain system design.

Some video encoders operate in what a person skilled in the art readilyrecognizes as a “coding loop.” As an oversimplified description, acoding loop can include the encoding part of an encoder (530) (“sourcecoder” henceforth) (responsible for creating symbols based on an inputpicture to be coded, and a reference picture(s)), and a (local) decoder(533) embedded in the encoder (303) that reconstructs the symbols tocreate the sample data that a (remote) decoder also would create (as anycompression between symbols and coded video bitstream is lossless in thevideo compression technologies considered in the disclosed subjectmatter). That reconstructed sample stream is input to the referencepicture memory (534). As the decoding of a symbol stream leads tobit-exact results independent of decoder location (local or remote), thereference picture buffer content is also bit exact between local encoderand remote encoder. In other words, the prediction part of an encoder“sees” as reference picture samples exactly the same sample values as adecoder would “see” when using prediction during decoding. Thisfundamental principle of reference picture synchronicity (and resultingdrift, if synchronicity cannot be maintained, for example because ofchannel errors) is well known to a person skilled in the art.

The operation of the “local” decoder (533) can be the same as of a“remote” decoder (310), which has already been described in detail abovein conjunction with FIG. 4. Briefly referring also to FIG. 4, however,as symbols are available and encoding/decoding of symbols to a codedvideo sequence by entropy coder (545) and parser (420) can be lossless,the entropy decoding parts of decoder (310), including channel (412),receiver (410), buffer (415), and parser (420) may not be fullyimplemented in local decoder (533).

An observation that can be made at this point is that any decodertechnology except the parsing/entropy decoding that is present in adecoder also necessarily needs to be present, in substantially identicalfunctional form, in a corresponding encoder. The description of encodertechnologies can be abbreviated as they are the inverse of thecomprehensively described decoder technologies. Only in certain areas amore detail description is required and provided below.

As part of its operation, the source coder (530) may perform motioncompensated predictive coding, which codes an input frame predictivelywith reference to one or more previously-coded frames from the videosequence that were designated as “reference frames.” In this manner, thecoding engine (532) codes differences between pixel blocks of an inputframe and pixel blocks of reference frame(s) that may be selected asprediction reference(s) to the input frame.

The local video decoder (533) may decode coded video data of frames thatmay be designated as reference frames, based on symbols created by thesource coder (530). Operations of the coding engine (532) mayadvantageously be lossy processes. When the coded video data may bedecoded at a video decoder (not shown in FIG. 4), the reconstructedvideo sequence typically may be a replica of the source video sequencewith some errors. The local video decoder (533) replicates decodingprocesses that may be performed by the video decoder on reference framesand may cause reconstructed reference frames to be stored in thereference picture cache (534). In this manner, the encoder (303) maystore copies of reconstructed reference frames locally that have commoncontent as the reconstructed reference frames that will be obtained by afar-end video decoder (absent transmission errors).

The predictor (535) may perform prediction searches for the codingengine (532). That is, for a new frame to be coded, the predictor (535)may search the reference picture memory (534) for sample data (ascandidate reference pixel blocks) or certain metadata such as referencepicture motion vectors, block shapes, and so on, that may serve as anappropriate prediction reference for the new pictures. The predictor(535) may operate on a sample block-by-pixel block basis to findappropriate prediction references. In some cases, as determined bysearch results obtained by the predictor (535), an input picture mayhave prediction references drawn from multiple reference pictures storedin the reference picture memory (534).

The controller (550) may manage coding operations of the video coder(530), including, for example, setting of parameters and subgroupparameters used for encoding the video data.

Output of all aforementioned functional units may be subjected toentropy coding in the entropy coder (545). The entropy coder translatesthe symbols as generated by the various functional units into a codedvideo sequence, by loss-less compressing the symbols according totechnologies known to a person skilled in the art as, for exampleHuffman coding, variable length coding, arithmetic coding, and so forth.

The transmitter (540) may buffer the coded video sequence(s) as createdby the entropy coder (545) to prepare it for transmission via acommunication channel (560), which may be a hardware/software link to astorage device that may store the encoded video data. The transmitter(540) may merge coded video data from the video coder (530) with otherdata to be transmitted, for example, coded audio data and/or ancillarydata streams (sources not shown).

The controller (550) may manage operation of the encoder (303). Duringcoding, the controller (550) may assign to each coded picture a certaincoded picture type, which may affect the coding techniques that may beapplied to the respective picture. For example, pictures often may beassigned as one of the following frame types:

An Intra Picture (I picture) may be one that may be coded and decodedwithout using any other frame in the sequence as a source of prediction.Some video codecs allow for different types of Intra pictures,including, for example Independent Decoder Refresh Pictures. A personskilled in the art is aware of those variants of I pictures and theirrespective applications and features.

A Predictive picture (P picture) may be one that may be coded anddecoded using intra prediction or inter prediction using at most onemotion vector and reference index to predict the sample values of eachblock.

A Bi-directionally Predictive Picture (B Picture) may be one that may becoded and decoded using intra prediction or inter prediction using atmost two motion vectors and reference indices to predict the samplevalues of each block. Similarly, multiple-predictive pictures can usemore than two reference pictures and associated metadata for thereconstruction of a single block.

Source pictures commonly may be subdivided spatially into a plurality ofsample blocks (for example, blocks of 4×4, 8×8, 4×8, or 16×16 sampleseach) and coded on a block-by-block basis. Blocks may be codedpredictively with reference to other (already coded) blocks asdetermined by the coding assignment applied to the blocks' respectivepictures. For example, blocks of I pictures may be codednon-predictively or they may be coded predictively with reference toalready coded blocks of the same picture (spatial prediction or intraprediction). Pixel blocks of P pictures may be coded non-predictively,via spatial prediction or via temporal prediction with reference to onepreviously coded reference pictures. Blocks of B pictures may be codednon-predictively, via spatial prediction or via temporal prediction withreference to one or two previously coded reference pictures.

The video coder (303) may perform coding operations according to apredetermined video coding technology or standard, such as ITU-T Rec.H.265. In its operation, the video coder (303) may perform variouscompression operations, including predictive coding operations thatexploit temporal and spatial redundancies in the input video sequence.The coded video data, therefore, may conform to a syntax specified bythe video coding technology or standard being used.

In an embodiment, the transmitter (540) may transmit additional datawith the encoded video. The video coder (530) may include such data aspart of the coded video sequence. Additional data may comprisetemporal/spatial/SNR enhancement layers, other forms of redundant datasuch as redundant pictures and slices, Supplementary EnhancementInformation (SEI) messages, Visual Usability Information (VUI) parameterset fragments, and so on.

In the related art, for coding a flag pred_mode_flag indicating whethera block is intra or inter coded, only one context is used, and values offlags applied on neighboring blocks are not used. Further, when aneighboring block is coded by an intra-inter prediction mode, it ispredicted using a mixture of intra and inter prediction modes, andtherefore, it may be more efficient to consider whether a neighboringblock is coded using an intra-inter prediction mode for a context designof signaling the flag pred_mode_flag.

Embodiments described herein may be used separately or combined in anyorder. In the following text, a flag pred_mode_flag indicating whether acurrent block is intra or inter coded.

FIG. 6 is a diagram (600) of a current block and neighboring blocks ofthe current block, according to embodiments.

Referring to FIG. 6, a current block (610) is shown along with a topneighboring block (620) and a left neighboring block (630) of thecurrent block (610). Each of the top neighboring block (620) and theleft neighboring block (630) may have a width of 4 and a height of 4.

In embodiments, information of whether neighboring blocks (e.g., the topneighboring block (620) and the left neighboring block (630)) are codedby an intra prediction mode, an inter prediction mode, or an intra-interprediction mode is used for deriving a context value used for entropycoding a flag pred_mode_flag of a current block (e.g., the current block(610)). In detail, when a neighboring block is coded by an intra-interprediction mode, an associated intra prediction mode is used for intramode coding and/or MPM derivation of the current block, but theneighboring block is considered as an inter-coded block when derivingthe context value for entropy coding the flag pred_mode_flag of thecurrent block although intra prediction is used for the neighboringblock.

In an example, the associated intra prediction mode of an intra-interprediction mode is always planar.

In another example, the associated intra prediction mode of anintra-inter prediction mode is always DC.

In still another example, the associated intra prediction mode isaligned with an intra prediction mode applied in the intra-interprediction mode.

In embodiments, when a neighboring block (e.g., the top neighboringblock (620) and the left neighboring block (630)) is coded by anintra-inter prediction mode, an associated intra prediction mode is usedfor the intra mode coding and/or MPM derivation of a current block(e.g., the current block (610)), but the neighboring block is alsoconsidered as an intra-coded block when deriving a context value forentropy coding a flag pred_mode_flag of the current block.

In an example, the associated intra prediction mode of an intra-interprediction mode is always planar.

In another example, the associated intra prediction mode of anintra-inter prediction mode is always DC.

In still another example, the associated intra prediction mode isaligned with an intra prediction mode applied in the intra-interprediction mode.

In an embodiment, a context index or value is incremented by 2, 0 and 1when a neighboring block is coded by an intra prediction mode, an interprediction mode and an inter-intra prediction mode, respectively.

In another embodiment, the context index or value is incremented by 1, 0and 0.5 when a neighboring block is coded by an intra prediction mode,an inter prediction mode and an inter-intra prediction mode,respectively, and the final context index is rounded to a nearestinteger.

After the context index or value is incremented with respect to all ofneighboring blocks of the current block and the final context index isdetermined, an average context index may be determined based on thedetermined final context index divided by a number of neighboring blocksand rounded to a nearest integer. The flag pred_mode_flag may be set toindicate that the current block is either intra coded or inter coded,based on the determined average context index. For example, if thedetermined average context index is 1, the flag pred_mode_flag may beset to indicate that the current block is intra coded, and if thedetermined average context index is 0, the flag pred_mode_flag may beset to indicate that the current block is inter coded.

In embodiments, information of whether a current block (e.g., thecurrent block (610)) is coded by an intra prediction mode, an interprediction mode or an inter-intra prediction mode is used for derivingone or more context values for entropy coding a CBF of the currentblock.

In an embodiment, three separate contexts (e.g., variables) are used forentropy coding the CBF: one is used when the current block is coded byan intra prediction mode, one is used when the current block is coded byan inter prediction mode, and one is used when the current block iscoded by an intra-inter prediction mode. The three separate contexts maybe applied only for coding luma CBF, only for coding chroma CBF or onlyfor coding both luma and chroma CBF.

In another embodiment, two separate contexts (e.g., variables) are usedfor entropy coding the CBF: one is used when the current block is codedby an intra prediction mode, and one is used when the current block iscoded by an inter prediction mode or an intra-inter prediction mode. Thetwo separate contexts may be applied only for coding luma CBF, only forcoding chroma CBF or only for coding both luma and chroma CBF.

In still another embodiment, two separate contexts (e.g., variables) areused for entropy coding the CBF: one is used when the current block iscoded by an intra prediction mode or an intra-inter prediction mode, andone is used when the current block is coded by an inter prediction mode.The two separate contexts may be applied only for coding luma CBF, onlyfor coding chroma CBF or only for coding both luma and chroma CBF.

FIG. 7 is a flowchart illustrating a method (700) of controllingintra-inter prediction for decoding or encoding of a video sequence,according to an embodiment. In some implementations, one or more processblocks of FIG. 7 may be performed by the decoder (310). In someimplementations, one or more process blocks of FIG. 7 may be performedby another device or a group of devices separate from or including thedecoder (310), such as the encoder (303).

Referring to FIG. 7, in a first block (710), the method (700) includesdetermining whether a neighboring block of a current block is coded byan intra-inter prediction mode. Based on the neighboring block beingdetermined to not be coded by the intra-inter prediction mode (710-No),the method (700) ends.

Based on the neighboring block being determined to be coded by theintra-inter prediction mode (710—Yes), in a second block (720), themethod (700) includes performing intra mode coding of the current block,using an intra prediction mode associated with the intra-interprediction mode.

In a third block (730), the method (700) includes setting a predictionmode flag indicating whether the current block is intra coded or intercoded, so that the prediction mode flag indicates that the current blockis inter coded.

The method (700) may further include, based on the neighboring blockbeing determined to be coded by the intra-inter prediction mode(710—Yes), performing MPM derivation of the current block, using theintra prediction mode associated with the intra-inter prediction mode.

The intra prediction mode associated with the intra-inter predictionmode may be a planar mode, a DC mode, or an intra prediction mode thatis applied in the intra-inter prediction mode.

The method (700) may further include determining whether the neighboringblock is coded by an intra prediction mode, an inter prediction mode, oran intra-inter prediction mode, based on the neighboring block beingdetermined to be coded by the intra prediction mode, incrementing acontext index of the prediction mode flag by 2, based on the neighboringblock being determined to be coded by the inter prediction mode,incrementing the context index by 0, based on the neighboring blockbeing determined to be coded by the intra-inter prediction mode,incrementing the context index by 1, determining an average contextindex, based on the incremented context index and a number ofneighboring blocks of the current block, and setting the prediction modeflag, based on the determined average context index.

The method may further include determining whether the neighboring blockis coded by an intra prediction mode, an inter prediction mode, or anintra-inter prediction mode, based on the neighboring block beingdetermined to be coded by the intra prediction mode, incrementing acontext index of the prediction mode flag by 2, based on the neighboringblock being determined to be coded by the inter prediction mode,incrementing the context index by 0, based on the neighboring blockbeing determined to be coded by the intra-inter prediction mode,incrementing the context index by 1, determining an average contextindex, based on the incremented context index and a number ofneighboring blocks of the current block, and setting the prediction modeflag, based on the determined average context index.

Although FIG. 7 shows example blocks of the method (700), in someimplementations, the method (700) may include additional blocks, fewerblocks, different blocks, or differently arranged blocks than thosedepicted in FIG. 7. Additionally, or alternatively, two or more of theblocks of the method (700) may be performed in parallel.

Further, the proposed methods may be implemented by processing circuitry(e.g., one or more processors or one or more integrated circuits). In anexample, the one or more processors execute a program that is stored ina non-transitory computer-readable medium to perform one or more of theproposed methods.

FIG. 8 is a simplified block diagram of an apparatus (800) forcontrolling intra-inter prediction for decoding or encoding of a videosequence, according to an embodiment.

Referring to FIG. 8, the apparatus (800) includes first determining code(810), performing code (820) and setting code (830). The apparatus (800)may further include incrementing code (840) and second determining code(850).

The first determining code (810) is configured to cause at least oneprocessor to determine whether a neighboring block of a current block iscoded by an intra-inter prediction mode.

The performing code (820) is configured to cause the at least oneprocessor to, based on the neighboring block being determined to becoded by the intra-inter prediction mode, perform intra mode coding ofthe current block, using an intra prediction mode associated with theintra-inter prediction mode.

The setting code (830) is configured to cause the at least one processorto, based on the neighboring block being determined to be coded by theintra-inter prediction mode, set a prediction mode flag indicatingwhether the current block is intra coded or inter coded, so that theprediction mode flag indicates that the current block is inter coded.

The performing code (820) may be further configured to cause the atleast one processor to, based on the neighboring block being determinedto be coded by the intra-inter prediction mode, perform Most ProbableMode (MPM) derivation of the current block, using the intra predictionmode associated with the intra-inter prediction mode.

The intra prediction mode associated with the intra-inter predictionmode may be a planar mode, a DC mode, or an intra prediction mode thatis applied in the intra-inter prediction mode.

The first determining code (810) may be further configured to cause theat least one processor to determine whether the neighboring block iscoded by an intra prediction mode, an inter prediction mode, or anintra-inter prediction mode. The incrementing code (840) may beconfigured to cause the at least one processor to, based on theneighboring block being determined to be coded by the intra predictionmode, increment a context index of the prediction mode flag by 2, basedon the neighboring block being determined to be coded by the interprediction mode, increment the context index by 0, and based on theneighboring block being determined to be coded by the intra-interprediction mode, increment the context index by 1. The seconddetermining code (850) may be configured to cause the at least oneprocessor to determine an average context index, based on theincremented context index and a number of neighboring blocks of thecurrent block. The setting code (830) may be further configured to causethe at least one processor to set the prediction mode flag, based on thedetermined average context index.

The first determining code (810) may be further configured to cause theat least one processor to determine whether the neighboring block iscoded by an intra prediction mode, an inter prediction mode, or anintra-inter prediction mode. The incrementing code (840) may beconfigured to cause the at least one processor to, based on theneighboring block being determined to be coded by the intra predictionmode, increment a context index of the prediction mode flag by 1, basedon the neighboring block being determined to be coded by the interprediction mode, increment the context index by 0, and based on theneighboring block being determined to be coded by the intra-interprediction mode, increment the context index by 0.5. The seconddetermining code (850) may be configured to cause the at least oneprocessor to determine an average context index, based on theincremented context index and a number of neighboring blocks of thecurrent block. The setting code (830) may be further configured to causethe at least one processor to set the prediction mode flag, based on thedetermined average context index.

The techniques described above, can be implemented as computer softwareusing computer-readable instructions and physically stored in one ormore computer-readable media.

FIG. 9 is a diagram of a computer system (900) suitable for implementingembodiments.

The computer software can be coded using any suitable machine code orcomputer language, that may be subject to assembly, compilation,linking, or like mechanisms to create code comprising instructions thatcan be executed directly, or through interpretation, micro-codeexecution, and the like, by computer central processing units (CPUs),Graphics Processing Units (GPUs), and the like.

The instructions can be executed on various types of computers orcomponents thereof, including, for example, personal computers, tabletcomputers, servers, smartphones, gaming devices, internet of thingsdevices, and the like.

The components shown in FIG. 9 for computer system (900) are exemplaryin nature and are not intended to suggest any limitation as to the scopeof use or functionality of the computer software implementingembodiments. Neither should the configuration of components beinterpreted as having any dependency or requirement relating to any oneor combination of components illustrated in the exemplary embodiment ofa computer system (900).

Computer system (900) may include certain human interface input devices.Such a human interface input device may be responsive to input by one ormore human users through, for example, tactile input (such as:keystrokes, swipes, data glove movements), audio input (such as: voice,clapping), visual input (such as: gestures), olfactory input (notdepicted). The human interface devices can also be used to capturecertain media not necessarily directly related to conscious input by ahuman, such as audio (such as: speech, music, ambient sound), images(such as: scanned images, photographic images obtain from a still imagecamera), video (such as two-dimensional video, three-dimensional videoincluding stereoscopic video).

Input human interface devices may include one or more of (only one ofeach depicted): keyboard (901), mouse (902), trackpad (903), touchscreen (910), data-glove (904), joystick (905), microphone (906),scanner (907), camera (908).

Computer system (900) may also include certain human interface outputdevices. Such human interface output devices may be stimulating thesenses of one or more human users through, for example, tactile output,sound, light, and smell/taste. Such human interface output devices mayinclude tactile output devices (for example tactile feedback by thetouch-screen (910), data-glove (904), or joystick (905), but there canalso be tactile feedback devices that do not serve as input devices),audio output devices (such as: speakers (909), headphones (notdepicted)), visual output devices (such as screens (910) to includecathode ray tube (CRT) screens, liquid-crystal display (LCD) screens,plasma screens, organic light-emitting diode (OLED) screens, each withor without touch-screen input capability, each with or without tactilefeedback capability-some of which may be capable to output twodimensional visual output or more than three dimensional output throughmeans such as stereographic output; virtual-reality glasses (notdepicted), holographic displays and smoke tanks (not depicted)), andprinters (not depicted).

Computer system (900) can also include human accessible storage devicesand their associated media such as optical media including CD/DVD ROM/RW(920) with CD/DVD or the like media (921), thumb-drive (922), removablehard drive or solid state drive (923), legacy magnetic media such astape and floppy disc (not depicted), specialized ROM/ASIC/PLD baseddevices such as security dongles (not depicted), and the like.

Those skilled in the art should also understand that term “computerreadable media” as used in connection with the presently disclosedsubject matter does not encompass transmission media, carrier waves, orother transitory signals.

Computer system (900) can also include interface(s) to one or morecommunication networks. Networks can for example be wireless, wireline,optical. Networks can further be local, wide-area, metropolitan,vehicular and industrial, real-time, delay-tolerant, and so on. Examplesof networks include local area networks such as Ethernet, wireless LANs,cellular networks to include global systems for mobile communications(GSM), third generation (3G), fourth generation (4G), fifth generation(5G), Long-Term Evolution (LTE), and the like, TV wireline or wirelesswide area digital networks to include cable TV, satellite TV, andterrestrial broadcast TV, vehicular and industrial to include CANBus,and so forth. Certain networks commonly require external networkinterface adapters that attached to certain general purpose data portsor peripheral buses ((949)) (such as, for example universal serial bus(USB) ports of the computer system (900); others are commonly integratedinto the core of the computer system (900) by attachment to a system busas described below (for example Ethernet interface into a PC computersystem or cellular network interface into a smartphone computer system).Using any of these networks, computer system (900) can communicate withother entities. Such communication can be uni-directional, receive only(for example, broadcast TV), uni-directional send-only (for exampleCANbus to certain CANbus devices), or bidirectional, for example toother computer systems using local or wide area digital networks.Certain protocols and protocol stacks can be used on each of thosenetworks and network interfaces as described above.

Aforementioned human interface devices, human-accessible storagedevices, and network interfaces can be attached to a core (940) of thecomputer system (900).

The core (940) can include one or more Central Processing Units (CPU)(941), Graphics Processing Units (GPU) (942), specialized programmableprocessing units in the form of Field Programmable Gate Areas (FPGA)(943), hardware accelerators (944) for certain tasks, and so forth.These devices, along with Read-only memory (ROM) (945), Random-accessmemory (RAM) (946), internal mass storage such as internal non-useraccessible hard drives, solid-state drives (SSDs), and the like (947),may be connected through a system bus (948). In some computer systems,the system bus (948) can be accessible in the form of one or morephysical plugs to enable extensions by additional CPUs, GPU, and thelike. The peripheral devices can be attached either directly to thecore's system bus (948), or through a peripheral bus (949).Architectures for a peripheral bus include peripheral componentinterconnect (PCI), USB, and the like.

CPUs (941), GPUs (942), FPGAs (943), and accelerators (944) can executecertain instructions that, in combination, can make up theaforementioned computer code. That computer code can be stored in ROM(945) or RAM (946). Transitional data can also be stored in RAM (946),whereas permanent data can be stored for example, in the internal massstorage (947). Fast storage and retrieve to any of the memory devicescan be enabled through the use of cache memory, that can be closelyassociated with one or more CPU (941), GPU (942), mass storage (947),ROM (945), RAM (946), and the like.

The computer readable media can have computer code thereon forperforming various computer-implemented operations. The media andcomputer code can be those specially designed and constructed for thepurposes of embodiments, or they can be of the kind well known andavailable to those having skill in the computer software arts.

As an example and not by way of limitation, the computer system havingarchitecture (900), and specifically the core (940) can providefunctionality as a result of processor(s) (including CPUs, GPUs, FPGA,accelerators, and the like) executing software embodied in one or moretangible, computer-readable media. Such computer-readable media can bemedia associated with user-accessible mass storage as introduced above,as well as certain storage of the core (940) that are of non-transitorynature, such as core-internal mass storage (947) or ROM (945). Thesoftware implementing various embodiments can be stored in such devicesand executed by core (940). A computer-readable medium can include oneor more memory devices or chips, according to particular needs. Thesoftware can cause the core (940) and specifically the processorstherein (including CPU, GPU, FPGA, and the like) to execute particularprocesses or particular parts of particular processes described herein,including defining data structures stored in RAM (946) and modifyingsuch data structures according to the processes defined by the software.In addition or as an alternative, the computer system can providefunctionality as a result of logic hardwired or otherwise embodied in acircuit (for example: accelerator (944)), which can operate in place ofor together with software to execute particular processes or particularparts of particular processes described herein. Reference to softwarecan encompass logic, and vice versa, where appropriate. Reference to acomputer-readable media can encompass a circuit (such as an integratedcircuit (IC)) storing software for execution, a circuit embodying logicfor execution, or both, where appropriate. Embodiments encompass anysuitable combination of hardware and software.

The inventors have observed that pred_mode_flag has some correlationwith its neighbors, neighboring blocks, to a current block. In a casethat the neighbor(s) use a pred_mode_flag equal to 1, context, thenthere may be a higher probability that the current block should or isalso using a pred_mode_flag equal to 1. In such cases, because of thecorrelation, improved context efficiency may be achieved in arithmeticcoding/decoding. Neighboring block information could be used as acontext for entropy coding/decoding a current pred_mode flag_for animprovement in coding efficiencies.

Additionally, in a VVC, there may be an intra-inter prediction mode as awhich is a special prediction mode as a mixture of inter prediction andalso intra prediction.

So, in a case in which there is a desire to add a neighboring block as acontext for entropy coding/decoding of a pred_mode_flag, there may be aproblem that if the neighboring block is coded by an intra-inter mode,then there may be a need to decide whether that neighboring block shouldbe considered as an intra- or as an inter-mode for deriving a context,and aspects of the present application relate to designs for context forentropy coding/decoding of a pred_mode_flag in which there could bedifferent designs.

As described above, if there are multiple neighboring blocks to beidentified, then three contexts may be used depending on how manyneighboring blocks are intra-coded. For example, if there are noneighboring blocks that are intra-coded, then a context index 0 may beused. If there is one neighboring block intra-coded, then a contextindex 1 may be used, and otherwise, there may be two neighboring blocksintra-coded in which case a context index 2 may be used. As such, theremay be three contexts depending on a number of neighboring blocks beingcoded by intra-coding.

However, additional improvements may be achieved by reducing the numberof contexts from three contexts to two contexts. For example, if none ofthe neighboring blocks are coded by intra-coding, then a first contextmay be used, and otherwise, if any of neighboring blocks are usingintra-coding, then another context may be used. Such designed may beadopted as part of VVC.

FIG. 10 illustrates an exemplary flowchart (1000) according toembodiments and similar to those described above except for thepresently described differences.

At step (1001), there may be a check to determine a neighboring block orblocks to a current block, and at step (1002), it may be determinedwhether one or more of those neighboring blocks are intra-coded. If not,then at step (1003), a first context may be used for the current block,and if so, then at step (1004) another context may be used for thecurrent block.

According to exemplary embodiments, not only may whether a neighboringblock or blocks be checked to determine whether intra-coding is used butalso to check if intra-inter coding is used.

FIG. 11 illustrates an exemplary flowchart (1100) according toembodiments and similar to those described above except for thepresently described differences.

At step (1001), there may be a check to determine a neighboring block orblocks to a current block, and at step (1002), it may be determinedwhether one or more of those neighboring blocks are intra-coded. If not,then at step (1003), it may be checked whether the neighboring block orblocks is using intra-inter coding, and if so, then at step (1004) afirst context may be used for the current block. Otherwise, if eitherintra-coding is determined at step (1102) or intra-inter coding isdetermined at step (1103), then another context may be used for thecurrent block at step (1105).

In addition to FIG. 10 and similarly in addition to FIG. 11, althoughpred_mode_flag has been discussed, further adoption by VVC includesother syntax elements, such as a skip flag, an affine flag, a subblockmerge flag as described further with the below syntaxes.

Coding quadtree syntax Descriptor coding_quadtree( x0, y0, log2CbSize,cqtDepth, treeType ) {  minQtSize = ( treeType = = DUAL_TREE_CHROMA ) ?MinQtSizeC : MinQtSizeY  maxBtSize = ( treeType = = DUAL_TREE_CHROMA ) ?MaxBtSizeC : MaxBtSizeY  if( ( ( ( x0 + ( 1 << log2CbSize) <=pic_width_in_luma_samples)? 1 : 0) +    ( ( y0 + ( 1 << log2CbSize) <=pic_height_in_luma_samples )? 1 : 0) +    ( ( ( 1 << log2CbSize ) <=maxBtSize ) ? 1 : 0 ) ) >= 2 &&   ( 1 << log2CbSize ) > minQtSize )  qt_split_cu_flag[ x0 ][ y0 ] ae(v)  if( cu_qp_delta_enabled_flag &&cqtDepth <= diff cu_qp_delta_depth ) {   IsCuQpDeltaCoded = 0  CuQpDeltaVal = 0   CuQgTopLeftX = x0   CuQgTopLeftY = y0  }  if(qt_split_cu_flag[ x0 ][ y0 ]) {   x1 = x0 + ( 1<< ( log2CbSize − 1 ) )  y1 = y0 + ( 1 << ( log2CbSize − 1 ) )   coding_quadtree( x0, y0,log2CbSize − 1, cqtDepth +1, treeType )   if( x1 <pic_width_in_luma_samples )    coding_quadtree( x1, y0, log2CbSize − 1,cqtDepth +1, treeType )   if( y1 < pic_height_in_luma_samples )   coding_quadtree( x0, y1, log2CbSize − 1, cqtDepth +1, treeType )  if( x1 < pic_width_in_luma_samples && y1 < pic_height_in_luma_samples)    coding_quadtree(x1, y1, log2CbSize − 1, cqtDepth +1, treeType )   }else   multi_type_tree( x0, y0, 1 << log2CbSize, 1 << log2CbSize,cqtDepth, 0, 0, 0, treeType ) }

Multi-type tree syntax Descriptor multi_type_tree( x0, y0, cbWidth,cbHeight, cqtDepth, mttDepth, depthOffset, partIdx, treeType ) {  if( (allowSplitBtVer | | allowSplitBtHor | | allowSplitTtVer | |allowSplitTtHor ) &&   ( x0 + cbWidth <= pic_width_in_luma_samples ) &&  ( y0 + cbHeight <= pic_height_in_luma_samples ) )   mtt_split_cu_flagae(v)  if( cu_qp_delta_enabled_flag && ( cqtDepth + mttDepth ) <=diff_cu_qp_delta_depth ) {   IsCuQpDeltaCoded = 0   CuQpDeltaVal = 0  CuQgTopLeftX = x0   CuQgTopLeftY = y0  }  if( mtt_split_cu_flag ) {  if( ( allowSplitBtHor | | allowSplitTtHor ) && ( allowSplitBtVer | |allowSplitTtVer ) )    mtt_split_cu_vertical_flag ae(v)   if( (allowSplitBtVer && allowSplitTtVer && mtt_split_cu_vertical_flag ) | |   ( allowSplitBtHor && allowSplitTtHor && !mtt_split_cu_vertical_flag ))    mtt_split_cu_binary_flag ae(v)   if( MttSplitMode[ x0 ][ y0 ][mttDepth ] = = SPLIT_BT_VER ) {  depthOffset += ( x0 + cbWidth >pic_width_in_luma_samples ) ? 1: 0    x1 = x0 + ( cbWidth / 2 )   multi_type_tree( x0, y0, cbWidth / 2, cbHeight, cqtDepth, mttDepth +1, depthOffset, 0, treeType )    if( x1 < pic_width_in_luma_samples )    multi_type_tree( x1, y0, cbWidth / 2, cbHeightY, cqtDepth,mttDepth + 1, depthOffset, 1, treeType )   } else if( MttSplitMode[ x0][ y0 ][ mttDepth ] = = SPLIT_BT_HOR ) {  depthOffset += ( y0+cbHeight > pic_height_in_luma_samples ) ? 1: 0    yl = y0 + ( cbHeight/ 2 )    multi_type_tree( x0, y0, cbWidth, cbHeight / 2, cqtDepth,mttDepth + 1, depthOffset, 0, treeType )    if( yl<pic_height_in_luma_samples )     multi_type_tree( x0, y1, cbWidth,cbHeight / 2, cqtDepth, mttDepth + 1, depthOffset, 1, treeType )   }else if( MttSplitMode[ x0 ][ y0 ][ mttDepth ] = = SPLIT_TT_VER ) {    x1= x0 + ( cbWidth / 4 )    x2 = x0 + ( 3 * cbWidth / 4 )   multi_type_tree( x0, y0, cbWidth / 4, cbHeight, cqtDepth, mttDepth +1, depthOffset, 0, treeType )    multi_type_tree( x1, y0, cbWidth / 2,cbHeight, cqtDepth, mttDepth + 1, depthOffset, 1, treeType )   multi_type_tree( x2, y0, cbWidth / 4, cbHeight, cqtDepth, mttDepth +1, depthOffset, 2, treeType )   {else { /* SPLITJT_HOR */    y1 = y0 +cbHeight / 4 )    y2 = y0 + ( 3 * cbHeight / 4 )    multi_type_tree( x0,y0, cbWidth, cbHeight / 4, cqtDepth, mttDepth + 1, depthOffset, 0,treeType )    multi_type_tree( x0, yl, cbWidth, cbHeight / 2, cqtDepth,mttDepth + 1, depthOffset, 1, treeType )    multi_type_tree( x0, y2,cbWidth, cbHeight / 4, cqtDepth, mttDepth + 1, depthOffset, 2, treeType)   }  } else   coding_unit( x0, y0, cbWidth, cbHeight, treeType ) }

Coding Unit Syntax Descriptor coding_unit( x0, y0, cbWidth, cbHeight,treeType ) {  if( slice_type != I ) {   cu_skip_flag[ x0 ][ y0 ] ae(v)  if( cu_skip_flag[ x0 ][ y0 ]= =0 )    pred_mode_flag ae(v)  }  if(CuPredMode[ x0 ][ y0 ] = = MODE_INTRA ) {   if( pcm_enabled_flag &&   cbWidth >= MinIpcmCbSizeY && cbWidth <= MaxIpcmCbSizeY &&   cbHeight >= MinIpcmCbSizeY && cbHeight <= MaxIpcmCbSizeY )   pcm_flag[ x0 ][ y0 ]   if( pcm_flag[ x0 ][ y0 ] {    while(!byte_aligned( ) )     pcm_alignment_zero_bit    pcm_sample( cbWidth,cbHeight, treeType )   } else {    if( treeType = = SINGLE_TREE | |treeType = = DUAL_TREE_CHROMA ) {     if( ( y0 % CtbSizeY ) > 0 )     intra_luma_ref_idx[ x0 ] [ y0 ] ae(v)     if( intra_luma_ref_idx[x0 ][ y0 ] = = 0)      intra_luma_mpm_flag[ x0 ][ y0 ] ae(v)     if(intra_luma_mpm_flag[ x0 ][ y0 ]      intra_luma_mpm_idx[ x0 ][ y0 ]ae(v)     else      intra_luma_mpm_remainder[ x0 ][ y0 ] ae(v)    }   if( treeType = = SINGLE_TREE | | treeType = = DUAL_TREE_CHROMA )    intra_chroma_pred_mode[ x0 ][ y0 ] ae(v)   }  } else { /* MODE INTER*/   if( cu_skip_flag[ x0 ][ y0 ]) {    if( MaxNumSubblockMergeCand > 0&& cbWidth >= 8 && cbHeight >= 8 )     merge_subblock_flag[ x0 ][ y0 ]ae(v)    if( merge_subblock_flag[ x0 ][ y0 ] = = 0 &&MaxNumMergeCand > 1)     merge_idx[ x0 ] [y0 ] ae(v)    if(merge_subblock_flag[ x0 ][ y0 ] = = 1 && MaxNumSubblockMergeCand > 1 )    merge_subblock_idx[ x0 ][ y0 ] ae(v)   } else {    merge_flag[ x0 ][y0 ] ae(v)    if( merge_flag[ x0 ][ y0 ]{    if(MaxNumSubblockMergeCand > 0 && cbWidth >= 8 && cbHeight >= 8 )    merge_subblock_flag[ x0 ][ y0 ] ae(v)    if( merge_subblock_flag[ x0][ y0 ] = = 0 && MaxNumMergeCand >1 )     merge_idx[ x0 ][ y0 ] ae(v)   if( merge_subblock_flag[ x0 ][ y0 ] = = 1 &&MaxNumSubblockMergeCand > 1 )     merge_subblock_idx[ x0 ][ y0 ] ae(v)  }else {    if( slice_type = = B )     inter_pred_idc[ x0 ][ y0 ] ae(v)   if( sps_affine_enabled_flag && cbWidth >= 16 && cbHeight >= 16 ) {    inter_affine _flag[ x0 ][ y0 ] ae(v)     if( sps_affine_type_flag &&inter_affine_flag[ x0 ][ y0 ])      cu_affine_type_flag[ x0 ][ y0 ]ae(v)    }    if( inter_pred_idc[ x0 ][ y0 ] != PRED_L1 ) {    if(num_ref idx_10_active_minus1 > 0)     ref idx_10[ x0 ][ y0 ] ae(v)   mvd_coding( x0, y0, 0, 0)    if( MotionModelIdc[ x0 ][ y0 ] > 0 )    mvd_coding( x0, y0, 0, 1)    if(MotionModelIdc[ x0 ][ y0 ] > 1)    mvd_coding( x0, y0, 0, 2)   mvp_10_flag[ x0 ][ y0 ] ae(v)   } else {   MvdL0[ x0 ][ y0 ][ 0 ] = 0    MvdL0[ x0 ][ y0 ][ 1 ] = 0   }   if(inter_pred_idc[ x0 ][ y0 ] != PRED_L0 ) {    if( num_refidx_11_active_minus1 > 0)     ref idx_11[ x0 ][ y0 ] ae(v)    if(mvd_11_zero_flag && inter_pred_idc[ x0 ][ y0 ] = = PRED_BI ) {    MvdL1[ x0 ][ y0 ][ 0 ] = 0     MvdL1[ x0 ][ y0 ][ 1 ] = 0    MvdCpL1[ x0 ][ y0 ][ 0 ][ 0 ] = 0     MvdCpL1[ x0 ][ y0 ][ 0 ][ 1 ]= 0     MvdCpL1[ x0 ][ y0 ][ 1 ][ 0 ] = 0     MvdCpL1[ x0 ][ y0 ][ 1 ][1 ] = 0     MvdCpL1[ x0 ][ y0 ][ 2 ][ 0 ] = 0     MvdCpL1[ x0 ][ y0 ][ 2][ 1 ] = 0    } else {     mvd_coding( x0, y0, 1, 0 )     if(MotionModelIdc[ x0 ][ y0 ] > 0 )      mvd_coding( x0, y0, 1, 1 )    if(MotionModelIdc[ x0 ][ y0 ] > 1 )      mvd_coding( x0, y0, 1, 2 )    mvp_11_flag[ x0 ][ y0 ] ae(v)    } else {     MvdL1[ x0 ][ y0 ][ 0 ]= 0     MvdL1[ x0 ][ y0 ][ 1 ] = 0    }    if( sps_amvr_enabled_flag &&inter_affine_flag = = 0 &&     (MvdL0[ x0 ][ y0 ][ 0 ] != 0 | | MvdL0[x0 ][ y0 ][ 1 ] != 0 | |      MvdL1[ x0 ][ y0 ][ 0 ] != 0 | | MvdL1[ x0][ y0 ][ 1 ] != 0 ))     amvr_mode[ x0 ][ y0 ] ae(v)    }   }  }  if(!pcm_flag[ x0 ][ y0 ] ) {   if( CuPredMode[ x0 ][ y0 ] != MODE INTRA &&cu_skip_flag[ x0 ][ y0 ] = = 0 )    cu_cbf ae(v)   if( cu_cbf )   transform_tree( x0, y0,cbWidth, cbHeight, treeType )  } }

That is, in example embodiments, several neighboring blocks are firstidentified, two contexts are used for entropy coding the pred_mode_flagof the current block, when none of the identified neighboring blocks iscoded by intra prediction mode, then the first context may be used,otherwise, the other context may be used.

Also, several neighboring blocks may be first identified, and twocontexts may be used for entropy coding the pred_mode_flag of thecurrent block. When none of the identified neighboring blocks is codedby an intra prediction mode or an intra-inter prediction mode, then thefirst context may be used, otherwise, the second context may be used.

In other examples, several neighboring blocks may be first identified,and two contexts may be used for entropy coding a CBF flag of thecurrent block. When none of the identified neighboring blocks is codedby intra prediction mode, then the first context may be used, otherwise,a second context may be used.

In other examples, several neighboring blocks may be first identified,and two contexts may be used for entropy coding the CBF flag of thecurrent block. When none of the identified neighboring blocks is codedby intra prediction mode or intra-inter prediction mode, then the firstcontext may be used, otherwise, the second context may be used.

When entropy coding syntax elements such as a Skip flag (cu_skip_flag),an Affine flag (inter_affine_flag), a Sub-block merge flag(merge_subblock_flag), CU split flags (qt_split_cu_flag,mtt_split_cu_flag, mtt_split_cu_vertical_flag,mtt_split_cu_binary_flag,), IMV flag (amvr_mode), an Intra-inter modeflag, a Triangle partitioning flag, it is proposed to use two contextsdepending on the corresponding flag values used for neighboring blocksaccording to the above-described embodiments. Examples of such flags areintroduced in the above noted tables. Meanings for these flags maysuggest different respective modes, such as one or another of skipmodes, affine modes, subblock merge modes, etc.

Further, according to exemplary embodiments, several neighboring blocksare first identified. When entropy coding the aforementioned flags, whennone of the identified neighboring blocks is coded by corresponding mode(meaning the associated flag value is signaled with a value indicatingthe corresponding mode is enabled), then a first context may be used,otherwise, the second context may be used. Additionally, any of theembodiments with respect to FIG. 10 and FIG. 11 may be used with theseadditional flags as would be understood by one of ordinary skill in theart in view of this disclosure.

As described above, according to exemplary embodiments, a context numbermay be advantageously reduced to only two contexts for a flag and suchpredictions.

While this disclosure has described several exemplary embodiments, thereare alterations, permutations, and various substitute equivalents, whichfall within the scope of the disclosure. It will thus be appreciatedthat those skilled in the art will be able to devise numerous systemsand methods which, although not explicitly shown or described herein,embody the principles of the disclosure and are thus within the spiritand scope thereof.

1. A method for video coding, the method comprising: determining whetherat least one of a plurality of neighboring blocks in a video sequence iscoded by an intra prediction mode which is different than an intra-interprediction mode; coding a flag of a current block by a first contextbased on determining that at least one of the plurality of neighboringblocks is coded by the intra prediction mode; and coding the flag of thecurrent block by a second context based on determining that none of theplurality of neighboring blocks are coded by at least the intraprediction mode.
 2. The method according to claim 1, wherein coding theflag of the current block comprises coding by only the first context andthe second context.
 3. The method according to claim 1, furthercomprising: determining whether at least one of the plurality ofneighboring blocks is coded by the intra-inter prediction mode; codingthe flag of the current block by the first context based on determiningthat at least one of the plurality of neighboring blocks is coded by theintra-inter prediction mode; and coding the flag of the current block bythe second context based on determining that none of the plurality ofneighboring blocks are coded by any of the intra prediction mode and theintra-inter prediction mode.
 4. The method according to claim 1, furthercomprising: coding a skip flag of the current block by a first skipcontext based on determining that at least one of the plurality ofneighboring blocks is coded by the intra prediction mode; and coding theskip flag of the current block by a second skip context based ondetermining that none of the plurality of neighboring blocks are codedby at least the intra prediction mode.
 5. The method according to claim1, further comprising: coding an affine flag of the current block by afirst affine context based on determining that at least one of theplurality of neighboring blocks is coded by the intra prediction mode;and coding the affine flag of the current block by a second affinecontext based on determining that none of the plurality of neighboringblocks are coded by at least the intra prediction mode.
 6. The methodaccording to claim 1, further comprising: coding a sub-block merge flagof the current block by a first sub-block merge context based ondetermining that at least one of the plurality of neighboring blocks iscoded by the intra prediction mode; and coding the sub-block merge flagof the current block by a second sub-block merge context based ondetermining that none of the plurality of neighboring blocks are codedby at least the intra prediction mode.
 7. The method according to claim1, further comprising: coding a coding unit (CU) split flag of thecurrent block by a first CU split context based on determining that atleast one of the plurality of neighboring blocks is coded by the intraprediction mode; and coding the CU split flag of the current block by asecond CU split context based on determining that none of the pluralityof neighboring blocks are coded by at least the intra prediction mode.8. The method according to claim 1, further comprising: coding anadaptive motion vector resolution (AMVR) flag of the current block by afirst AMVR context based on determining that at least one of theplurality of neighboring blocks is coded by the intra prediction mode;and coding the AMVR flag of the current block by a second AMVR contextbased on determining that none of the plurality of neighboring blocksare coded by at least the intra prediction mode.
 9. The method accordingto claim 1, further comprising: coding an intra-inter mode flag of thecurrent block by a first intra-inter mode context based on determiningthat at least one of the plurality of neighboring blocks is coded by theintra prediction mode; and coding the intra-inter mode flag of thecurrent block by a second intra-inter mode context based on determiningthat none of the plurality of neighboring blocks are coded by at leastthe intra prediction mode.
 10. The method according to claim 1, furthercomprising: coding a triangle partitioning mode flag of the currentblock by a first triangle partitioning mode context based on determiningthat at least one of the plurality of neighboring blocks is coded by theintra prediction mode; and coding the triangle partitioning mode flag ofthe current block by a second triangle partitioning mode context basedon determining that none of the plurality of neighboring blocks arecoded by at least the intra prediction mode.
 11. The method according toclaim 1, further comprising: coding a coded block flag (CBF) of thecurrent block by a first CBF context based on determining that at leastone of the plurality of neighboring blocks is coded by the intraprediction mode; and coding the CBF of the current block by a second CBFcontext based on determining that none of the plurality of neighboringblocks are coded by at least the intra prediction mode.
 12. An apparatusfor video decoding or encoding, the apparatus comprising: at least onememory configured to store computer program code; and at least oneprocessor configured to access the at least one memory and operateaccording to the computer program code, the computer program codecomprising: first determining code configured to cause the at least oneprocessor to determine whether at least one of a plurality ofneighboring blocks in a video sequence is coded by an intra predictionmode which is different than an intra-inter prediction mode; firstperforming code configured to cause the at least one processor toentropy code a flag of a current block by a first context based ondetermining that at least one of the plurality of neighboring blocks iscoded by the intra prediction mode; and second performing codeconfigured to cause the at least one processor to code the flag of thecurrent block by a second context based on determining that none of theplurality of neighboring blocks are coded by at least the intraprediction mode.
 13. The apparatus according to claim 12, wherein thefirst performing code is further configured to cause the processor toperform coding, of the flag of the current block, comprising coding byonly the first context and the second context.
 14. The apparatusaccording to claim 12, wherein the computer program code furthercomprises: second determining code configured to cause the at least oneprocessor to determine whether at least one of the plurality ofneighboring blocks is coded by the intra-inter prediction mode; thirdperforming code configured to cause the at least one processor to codethe flag of the current block by the first context based on determiningthat at least one of the plurality of neighboring blocks is coded by theintra-inter prediction mode; and fourth performing code configured tocause the at least one processor to code the flag of the current blockby the second context based on determining that none of the plurality ofneighboring blocks are coded by any of the intra prediction mode and theintra-inter prediction mode.
 15. The apparatus according to claim 12,wherein the computer program code further comprises: third performingcode configured to cause the at least one processor to code a skip flagof the current block by a first skip context based on determining thatat least one of the plurality of neighboring blocks is coded by theintra prediction mode; and fourth performing code configured to causethe at least one processor to code the skip flag of the current block bya second skip context based on determining that none of the plurality ofneighboring blocks are coded by at least the intra prediction mode. 16.The apparatus according to claim 12, further comprising: thirdperforming code configured to cause the at least one processor to codean affine flag of the current block by a first affine context based ondetermining that at least one of the plurality of neighboring blocks iscoded by the intra prediction mode; and fourth performing codeconfigured to cause the at least one processor to code the affine flagof the current block by a second affine context based on determiningthat none of the plurality of neighboring blocks are coded by at leastthe intra prediction mode.
 17. The apparatus according to claim 12,further comprising: third performing code configured to cause the atleast one processor to code a sub-block merge flag of the current blockby a first sub-block merge context based on determining that at leastone of the plurality of neighboring blocks is coded by the intraprediction mode; and fourth performing code configured to cause the atleast one processor to code the sub-block merge flag of the currentblock by a second sub-block merge context based on determining that noneof the plurality of neighboring blocks are coded by at least the intraprediction mode.
 18. The apparatus according to claim 12, furthercomprising: third performing code configured to cause the at least oneprocessor to code a coding unit (CU) split flag of the current block bya first CU split context based on determining that at least one of theplurality of neighboring blocks is coded by the intra prediction mode;and fourth performing code configured to cause the at least oneprocessor to code the CU split flag of the current block by a second CUsplit context based on determining that none of the plurality ofneighboring blocks are coded by at least the intra prediction mode. 19.The apparatus according to claim 12, further comprising: thirdperforming code configured to cause the at least one processor to codean adaptive motion vector resolution (AMVR) flag of the current block bya first AMVR context based on determining that at least one of theplurality of neighboring blocks is coded by the intra prediction mode;and fourth performing code configured to cause the at least oneprocessor to code the AMVR flag of the current block by a second AMVRcontext based on determining that none of the plurality of neighboringblocks are coded by at least the intra prediction mode.
 20. Anon-transitory computer-readable storage medium storing instructionsthat cause at least one processor to: determine whether at least one ofa plurality of neighboring blocks in a video sequence is coded by anintra prediction mode which is different than an intra-inter predictionmode; code a prediction mode flag of a current block by a first contextbased on determining that at least one of the plurality of neighboringblocks is coded by the intra prediction mode; and code the predictionmode flag of the current block by a second context based on determiningthat none of the plurality of neighboring blocks are coded by at leastthe intra prediction mode.